package de.schlinke_marius.database;

import android.database.Cursor;
import android.database.sqlite.SQLiteException;

public interface BenchmarkTbl {
	
	public static final String TABLE_NAME = "Benchmark";
	
	public static final String COLUMN_ID = "_ID";
	
	public static final String COLUMN_FK_EXAMPLES = "FK_EXAMPLES";
	
	public static final String COLUMN_BENCHMARK_NAME = "BENCHMARK_NAME";
	
	public static final String COLUMN_BENCHMARK_TYPE ="BENCHMARK_TYPE";
	
	public static final String COLUMN_BENCHMARK_VALUE = "BENCHMARK_VALUE";
	
	
	public static final String[] COLUMNS = { 
									COLUMN_ID,
									COLUMN_FK_EXAMPLES,
									COLUMN_BENCHMARK_NAME,
									COLUMN_BENCHMARK_TYPE,
									COLUMN_BENCHMARK_VALUE};
	
	public static final String CREATE_TABLE_BENCHMARK = " CREATE TABLE  IF NOT EXISTS " + TABLE_NAME+  " ( "
									+ COLUMN_ID + " INTEGER PRIMARY KEY  AUTOINCREMENT  NOT NULL," 
									+ COLUMN_FK_EXAMPLES + " INTEGER,"
									+ COLUMN_BENCHMARK_NAME + " text,"
									+ COLUMN_BENCHMARK_TYPE + " text,"
									+ COLUMN_BENCHMARK_VALUE + " text, FOREIGN KEY (FK_EXAMPLES) REFERENCES EXAMPLES (_ID) );";
	
	public static final String INSERT_INTO_BENCHMARK  = "INSERT INTO " + TABLE_NAME + "(" + COLUMN_ID + "," + COLUMN_FK_EXAMPLES + "," + COLUMN_BENCHMARK_NAME + "," + COLUMN_BENCHMARK_TYPE + " , " + COLUMN_BENCHMARK_VALUE + ") values (?,?,?,?,?)";

	public long insertIntoBenchmark (int id, int fkExamples, String benchmarkName, String benchmarkType, String benchmarkValue ) throws SQLiteException;
	
	public Cursor getBenchmark(int id) throws SQLiteException;
}
